﻿
Type FrameEvent
	Field timeSinceLastEvent:Float
	Field timeSinceLastFrame:Float
End Type


Type FrameListener
	Field __listener:Byte ptr
	Field __frameStarted:Int
	Field __frameEnded:Int
	
	Method New()
		Self.__listener = o_createFrameListener()				
		Self.__frameStarted = Int(Byte ptr(Self.frameStarted))
		Self.__frameEnded = Int(Byte ptr(Self.frameEnded))
	End Method
	
	Method setFrameStarted(func:Int())
		Self.__frameStarted = Int(Byte ptr(func))
		o_defineFrameStarted(Self.__frameStarted, Self.__listener)
	End Method
	
	Method setFrameEnded(func:Int())
		Self.__frameEnded = Int(Byte ptr(func))
		o_defineFrameEnded(Self.__frameEnded, self.__listener)
	End Method
	
	Function frameStarted() Abstract
	
	Function frameEnded() Abstract
End Type
